Use new handles and add separate function for processing requests without allocating new handles

Breakout URL expansion into a new function

Use handles for storing expanded URLs

Breakout nonce generation into its own function

Only build user_agent string once on initialise
Ignore products of make checks
Fix warnings from GCC and clang