California mayor resigns, will plead guilty to acting as agent for Chinese government