HA support for glance

This is a first stab at HA support for glance. Currently untested, more of a rfc :) Please, check the commit messages too, if they make sense.