examples: Get pedantic about initialization and cleanup

These changes make the examples reflect what is API documented regarding
initialization and cleanup.

All examples will now:

- Call curl_global_init immediately after the program starts.
- Call curl_global_cleanup immediately before the program exits.
- Call curl_easy_cleanup for each easy handle.
- Follow the cleanup call order for multi handles and the easy handles
they contain. Specifically this order: curl_multi_remove_handle,
curl_easy_cleanup, curl_multi_cleanup.

More can be done. To really get pedantic there needs to be logic to
check every curl function that can return an error. For example right
now in some cases curl_multi_init() isn't checked for NULL.