Add support for a custom user agent at compile-time

Make it possible to specify a custom user agent at compile time
and then use on all libcurl calls instead of just going with
PACKAGE_NAME/PACKAGE_VERSION
configure.in: Move the useragent config to a more appropriate block.