A Pennsylvania jury convicted comedian Bill Cosby on all three counts of drugging and molesting a onetime friend in 2004, a decisive victory for prosecutors in one of the first celebrity sexual-assault trials of the #MeToo era.