API: More work on the API server

* Improved error handling
* VirtualIPs function added
* Limits function added
* Limits checked in create
* Other cleanups/fixes

Change-Id: Idf5abc1d9a568d8193aee9bc7b60c3224c8c331c