ApplicationService: add a static function for API control

* This method is used to check API Control.It queries permissions
  from DB and tell the result to extension.
[Extensions] Add API for CheckAPIAccessControl

This API is for extension developer. The API need to be called in the
implementation of each exported API in C or C++ code.