Rename User::resolveRolesAsArray() to User::getRoles() and change the
visibility to public. Additionally allow relations to be loaded from
cache if it's available instead of querying the database each time it
being used.

Signed-off-by: crynobone <crynobone@gmail.com>