Refactor the API router to ES6 class

Authored by santhosh on Wed, Sep 13, 11:40 AM.

Description

Refactor the API router to ES6 class

In follow ups, we are trying to make the router a simple path to handler
mapper and handlers in seperate files. This refactoring will help us
to provide v2 of apis in future without much code duplication.

Change-Id: I10009261b311c80fdea4c300199b73a44880cbe4

Details