autogen.sh: support calling from out of tree

https://bugzilla.gnome.org/show_bug.cgi?id=667572
Drop obsolete g_thread_init()

Since version 2.2 g_type_init() initializes also the thread
system so g_thread_init() is not required anymore. It is deprecated since glib
2.31.

Bump glib requirement accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=650061
introspection: add info about C headers to use

vapigen needs this information to be able to generate correct
.vapi files.

https://bugzilla.gnome.org/show_bug.cgi?id=678153
Accept -1 len in rest_xml_parser_parse_from_data

This means that the passed in string is nul-terminated and that
rest_xml_parser_parse_from_data should get its length with strlen.

https://bugzilla.gnome.org/show_bug.cgi?id=657032
Use HMAC glib implementation instead of rolling our own

https://bugzilla.gnome.org/show_bug.cgi?id=658725
Revert "Use HMAC glib implementation instead of rolling our own"

This reverts commit 2a8dac4cc7aeca25b182bb9806ddb1881f2f4994.
Pushed by mistake...
Add RestProxy::authenticate signal

If caught by application, this signal can be used to set the
credentials to use when authentication is needed. If not caught,
librest behaviour will be unchanged (try to use what the
username/password properties were set to first, and don't try to reuse
them if this fails).

https://bugzilla.gnome.org/show_bug.cgi?id=658937
Introduce RestProxyAuth type

This will be used by the RestProxy authentication code to be
able to "pause" the sending of the current message. This will give
applications the opportunity to get back to the main loop to
do the authentication work before resuming the current request.

https://bugzilla.gnome.org/show_bug.cgi?id=658937
Add rest_proxy_auth_[un]pause

They can be used in RestProxy::authenticate signals
to suspend the current authentication attempt. This allows to get
back to the mainloop to get the credentials, and to then rerun
the call with the correct credentials.

https://bugzilla.gnome.org/show_bug.cgi?id=658937
Propagate RestProxyAuth object in ::authenticate signal

This will make it possible to pause/resume the current call
during authentication callbacks to be able to get back to
the mainloop to get authentication credentials.

https://bugzilla.gnome.org/show_bug.cgi?id=658937
build: minor version bump to .90 to reflect beta status
Do not set REST_SYSTEM_CA_FILE session attribute while building with --without-ca-certificates
build: Fix previous commit

Need to use #ifdef here, not #if.
oauth: fix typo in method name
Support multipart/form-data requests in OAuthProxyCall

If the user uploads a file using a multipart/form-data request,
the that parameter must not be used to encode the request.
Add example for twitter image upload

The examples creates a new tweet and also uploads a simple image
call: disconnect GCancellable 'cancel' signal

Without this fix, the call object could be freed before any
cancellation. But the 'cancel' callback should not be executed on a
freed object.

https://bugzilla.gnome.org/show_bug.cgi?id=702483
Fix compilation with older glibs

configure.ac requires glib 2.24, but librest is making use of
glib functions that were added in later releases (g_clear_object,
g_simple_async_report_take_gerror_in_idle, ...).
This commit adds reimplementation of these functions which will
be used when an older glib is present at build time. glib-compat.[ch]
come from spice-gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=703103
Add marshaller for RestProxy::authenticate signal

g_cclosure_marshal_generic() was only introduced in glib 2.30, for
older glib we need to specify the marshaller to use. If only NULL is
passed, we get a segfault when trying to invoke the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=703642
rest-proxy-call: Use memdup, not strdup, as HTTP response data might be binary

This fixes an issue when a GSoC student was trying to fetch images from
gravatar using librest.