Remove unused cache functions from token.core

With the move of functionality from token.core to token.persistence
the cache functions and import are no longer needed in token.core.

Change-Id: I97c96fff64b5c952155c4054df05b1b3ec3a83c5
Remove duplicated assertion

"assert_domain_enabled" method is called within "assert_user_enabled", no need perform duplicated assertion

Change-Id: I4a7895bbda614bbf31b3d3c1805389aa4465b2fb
Signed-off-by: Dave Chen <wei.d.chen@intel.com>
Handle default string values when using user_enabled_invert

When the user_enabled_invert setting is being used, values returned
from LDAP are ultimately converted to a bool type when we reach the
inversion logic.  If the user_enabled_default value is used due to
no value being returned from LDAP, the type is a string.  This causes
the inversion logic to be evaluated incorrectly, as 'not' will return
False for any non-empty string.  This results in disabled accounts
that should be enabled.

Change-Id: Id7b024c12815748305458ca05fc8f8a6324c1908
Closes-bug: #1376053
Merge "Handle default string values when using user_enabled_invert"
Merge "Remove duplicated assertion"
Merge "Remove unused cache functions from token.core"