refactor partitions api
auto-configuration for default realm
implement IdentityManagerFactory.getRealm()/getTier() methods
fix compiler errors