cli: Multiple modifications for API utility

* Add function doc
* Made sure URL fragments and parameters are properly escaped
* Enable parameters where value is string (previously an array was required)
* Return the status code and headers of the request
* Add shorthand assert for response codes
* Add map function to general CLI utilities

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: cat: use API to retrieve file content

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add date command

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add df command

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add free command

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add mkdir command

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add rm command

It's currently very simple because the API doesn't support any other operation,
yet.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Add dmesg command

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'cli-port-commands'

Or writes:

  Porting some commands from the previous shell. I paused and sent these, while
  I'm currently considering some changes to the shell execution environment to
  make it easier to work, specifically for implementing features like CWD.

  In this patch set:

  1. Some modifications to the API utility and libraries.
  2. Update cat command to use the API.
  3. Add some commands from the previous shell.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>