[NUCCORE-1192] Move many methods from ApiAdapter relating to identity
into IdentityUtils so we can more easily commonise single-field
application id and datastore id