Api application registration & token generation restructuring #536

Open
rajitha wants to merge 2 commits from rajitha/device-mgt-core:auth-restructure into master