API Key Identification and Token Service update

- Added security mode selection to the Context with Basic Authorization
  and API Key Identification modes
- Token Service cleaned up and completed with all supported operations
- Various minor cleanups