[fix] Update top-level functions

that has been introduced in order to implement the mqtt layers
[fix] added missing new layer api functions
[fix] fixed cleaning of the buffers
Merge pull request #120 from xively/fix_v2

Fix HTTP+CSV