RestProxyCall: Handle soup_error_new() failures

If given a URI it can't parse, soup_error_new() will return NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=728953
Use g_hash_table_replace() in rest_params_add()

rest_params_add() is currently using g_hash_table_insert() to add
the passed in parameter in the parameter hash table. The key which
is used is owned by the associated value.

When using rest_params_add to replace an already existing parameter,
the existing value will be freed with rest_param_unref().

However, g_hash_table_insert() does not replace the key when it already
exists in the hash table: "If the key already exists in the GHashTable
its current value is replaced with the new value... If you supplied a
key_destroy_func when creating the GHashTable, the passed key is freed
using that function."

This means that after replacing an already existing parameter, the
corresponding key will still be the old one, which is now pointing
at freed memory as the old value was freed.

g_hash_table_replace() ensures that the key will still be valid, even
when replacing existing parameters:
"Inserts a new key and value into a GHashTable similar to
g_hash_table_insert(). The difference is that if the key already exists
in the GHashTable, it gets replaced by the new key."

https://bugzilla.gnome.org/show_bug.cgi?id=665716
Ignore '/' at beginning of REST function

When building the HTTP URL to access for a REST operation,
RestProxyCall::prepare_message, a '/' at the end of the base URL
is ignored, but a '/' at the beginning of the REST function is not.

When interacting with the oVirt REST API, I often end up building calls
with for example 'https://ovirt.example.com' as the base URI, and '/api/vms/'
as the function, which then leads to an URI with 2 '/':
'https://ovirt.example.com//api/vms'

https://bugzilla.gnome.org/show_bug.cgi?id=728952
Fix rest_xml_node_print name in gtk-doc annotation
Add rest_proxy_call_get_function()

There are rest_proxy_call_[gs]et_method() methods, a
rest_proxy_call_set_function() method, but no corresponding getter.
Adding it makes the API more consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=708358
Allow to modify REST function in serialize_params vfunc

RestProxyCall::prepare_message() calls the serialize_params vfunc
so that child classes can serialize the call parameters in whichever
way they want.
One way of doing that could be to append the parameters to the URI
that is called (http://example.com?param1=value1;param2=value2).
However, the URI to call is determined at the beginning of
prepare_message(), and is not refreshed after calling
RestProxyCall::serialize_params(), so it's not possible to
append parameters to the URI that is going to be called.

This commit rebuilds the URI to call after calling serialize_params()
in case it has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=708359