A police chief in Ukraine has resigned after officers reportedly fled the scene of a shooting in Kyiv which killed seven people.