Latvia's prime minister has resigned after her coalition partner pulled its support amid controversy over a string of drone incidents.