Add extension discovery to core API.

Add a mechanism to discover the extensions that are available on the
server and the entry point to using them.

Change-Id: I40d90085aa546e4eb78acd86e9e67b4c8d27c875
Merge "Add extension discovery to core API."