A court in India has convicted a man of the rape and murder of a trainee doctor - a crime that sparked nationwide outrage.