(PUP-2924) Initialize resources from Type classes

This patch extends the signature of `Puppet::Resource#initialize` to accept
subclasses of `Puppet::Type` as arguments. This allows `resource_type` to be
set during initialzation for some cases and eliminates a later, costly, call to
`environment.known_resource_types`.
(PUP-2349) Treat mode strings as octal

Previously there was logic to convert incoming mode using to_i,
but if it were a String that would convert the string as decimal,
whereas mode is always specified as octal. I don't know why the
to_i conversion was in there and whether it ever worked in a
meaningful way.

So fix this to convert Strings as octal.
(PUP-2349) Specify mode as a string containing an octal mode

Previously, mode was specified in some places as a Fixnum, in others
as a String. Consistently specify mode as a string containing octal.
(PUP-2349) Add deprecation warning for non-string mode property values

The 'future' (4.x) parser treats literal numbers as actual numbers instead of
strings as the 3.x parser did. This makes file resources that use unquoted
mode values behave strangely (see PUP-2156) so we are deprecating non-String
values for mode.

So this change adds a deprecation warning for non-String values of mode
when running with --parser future.
Merge pull request #2964 from kylog/issue/pup-2349/deprecate-non-string-modes-on-file-type

Issue/pup 2349/deprecate non string modes on file type
Merge pull request #2979 from Sharpie/pup-2924-resource-new-types

(PUP-2924) Initialize resources from Type classes