Generalize http method logic, use tempfile

In preparation for performing HTTP HEAD requests, generalize the method
containing the Net::HTTP logic. This commit moves the logic from the
http_get() method to a new method, http(), which accepts an IO object to
write the body to and returns the HTTP response object for any request
made. It supports performing HEAD or other request types via the options
parameter.

While making these changes it was convenient to introduce a tempfile
download pattern, wherein rather than saving directly to the target
path, the provider will create a tempfile and mv it to the target path
upon successful download. This pattern prevents incomplete files from
being dropped into the target path.
Add ensure=latest support via last-modified header

At times it is desirable to always ensure that a local copy of a file
matches the latest version available from a remote source. For
remote_file, which often specifies an http or https webserver as content
origin, automatically fetching a full checksum or other cryptographic
means of verifying content cannot be done simply since there is no
standard means a webserver might provide a hash. However, it is common
for a webserver to provide the Last-Modified header, which can serve as
a simple mtime check to indicate whether or not the local copy of the
file is the same copy currently being served by the webserver.

Given the use case of "when the file on the webserver is changed, the
local copy should also be changed", using the Last-Modified header to
indicate whether or not to download an updated version of the target
file will work to very simply automatically download updated content
when available, given ensure=latest.
Add header comments to each provider method

This commit adds header comments to each method in the provider. Doing
so makes the methods consistent with each other (many of the newer
methods have header comments), and consistency improves readability.
Update README to show new ensure=latest feature
Add support for basic auth

This commit adds a username and password parameter to the type and a
basic_auth implementation in the provider for http, to allow specifying
remote sources that require it.