[api] add HTTP PUT and HTTP DELETE support for ApiRequest

1. Separate the old setParam method to setUrlParam and setFormParam.

2. In the previous code, we call setParam in a HTTP GET request where
setUrlParam should be used and setParam in a HTTP POST request where
setFormParam should be. This patch corrects them all.

3. Introduce a more raw method setData which might be used soon.

4. Add HTTP PUT and HTTP DELETE request support