Former Cleveland Browns QB Brian Hoyer to sign with San Francisco 49ers