Add extension datamodel and extension handler

Moved the extension datamodel to a separate file and added extension
handler class. Also modified the extension controller and unit test.
This code is based on the new API worker architecture.

Change-Id: Iac3ca0faa136195379cc56cb6ec48fa597e8f705
Merge "Add extension datamodel and extension handler"