type: First try at defining the apt_key type.
type: Add additional read-only parameters.

We can discover these parameters by parsing `apt-key`'s output and most
of them are useful for inventory/audit scenario's.
provider: Add initial implementation of apt_key.
type: Check if we have a source before autorequire
type: Change most params to properties.

Properties can be discovered, parameters cannot and hence don't show up
in the output of `puppet resource type`. Since we can discover these
things about a key they should be properties.

Minor touch ups to the descriptions included.
provider: Get rid of a superfluous variable.

This makes @apenney happier.
provider: Build the regexp as a regexp.

We were previously building it out as a string but @igalic pointed out
we could use /x and have the benefit of inline comments.
provider: Implement getters/setters for properties

Since most of our properties are read-only the setter is implemented as
returning a failure with a human friendly error message.
spec: unit tests for apt_key type
spec: test for allowed URI schemes in type

Previously we were checking that an invalid URI scheme raised an error
but we weren't checking if those that we expect to work actually work.

This commit adds three tests that take care of that omission.
provider: use mk_resource_methods instead

By using `mk_resource_methods` the property getters and setters are
automatically created for us.

Since we have read-only properties we alias the setters to the new
read_only function and remove the old READ_ONLY constant which is no
longer needed.

Additionally we need to define the expired getter because the getter
created by mk_resource_methods doesn't seem to like it when the
property_hash returns false as a value.
provider: PUP-1470 to explain overridden getter.
type/provider: Minor touch ups, s/added/created.

We used to have a added property but this property didn't actually hold
the date the key was added to the system but when the key was created.

Rest of the fixes include hashrocket alignment, extra white space
removal and a few typo's.
provider: Add destroy method to remove key.
type: Validate :id to be a plausible GPG key ID.
type: Change source to take path to a file.

The previous idea was that people could pass in a puppet:// URI to
source and that we would then create and autorequire that file. However,
that doesn't seem possible / easily done in Types/Providers.

Instead, people can now pass in a path to a file on the target system
which in turn will be created by the `apt::key` defined type prior to
calling out to `apt_key`.
provider: Implement the create method.

This method is used to create a resource, aka change its state from
absent to present in this case.

When both content and source are omitted we fetch the key from the
keyserver and if provider pass in additional options.

If content is provided a temporary file is created with that content and
then passed to `apt-key add`. This is less error prone than trying to
pipe stuff in through stdin by using `apt-key add -`.

If source is provided and has a scheme of http or https we download the
key to a temporary file which is then passed to `apt-key add`. OpenURI
wraps around net/http and net/https so this should work as long as, when
the key is served over HTTPS, the certificate can be validated.

If source is provided but has a scheme of nil we assume it's a local
file which we autorequire in the type and hence can safely pass in to
`apt-key add`.
type: Fix the regexp to match from start.
tests: Fix tests for Ruby 1.8.7, Puppet < 3.2.
type: Clarify the autorequire behaviour.