Tens of thousands of police officers were expected along with politicians and other mourners Sunday at the funeral of a New York City policeman killed last month in an ambush that deepened a rift between Mayor Bill de Blasio and the force.