Sync domains from keystone(in v3) to api-server. refactor to accomodate keystone v2/3

Change-Id: I6389e978211125fa5c849203188c1322b630dea0