Clean up ApiServer, ApiServlet and ApiDispatcher flow to handle various CloudRuntimeException
and CloudException in one place, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.

Signed-off-by: Min Chen <min.chen@citrix.com>
CLOUDSTACK-713: Limit Resources to domain/accounts

Addition of two new resource types i.e. CPU and RAM in the existing pool of
resource types.
Added some methods to set the limits on these resources using updateResourceLimit
API command and to get a count using updateResourceCount. Also added calls in the
Virtual machine life cycle to check these limits and to increment/decrement the new
resource types

Resource Name  :: Resource type number
    CPU		      8
    RAM		      9

Also added Unit Tests for the same.

Signed-off-by: Sanjay Tripathi <sanjay.tripathi@citrix.com>