Add support for posting json data with APIClient.
Cleanup API usages.
Add support for creating metric groups and storing samples.