Add a way to implement custom library arguments in API calls

Options starting with _ won't be used to construct the request.
api.raw_call: Add option '_raw' to return unprocessed JSON strings

- When this option is used, the called method will return an extra
value with the type name.
- Also moved the json parsing code into api.parse_json