The US rapper and record producer was convicted over sexual encounters, capping a sordid federal case that featured harrowing testimony.