Registering & deregistering apids

This is an addition that allows us to register and deregister Android apids using the existing methods. The is_android flag defaults to False, so existing applications using the register / deregister methods will not need to change anything.