Moving-horizon estimation for switching discrete-time linear systems