[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.