api/async: fix json decoder and add a few tests for the asynchronous api code
Note that test_post_struct_json is failing with current implementation, the fix comes with the second revision in this diff:
json.loads() expect a str, not a bytes.
Depends on !63 (closed).
Migrated from D1671 (view on Phabricator)