(PUP-3436) Optimize CPU intensitive Compiler methods

This commit contains some performance optimizations in methods
that showed up as very time consuming in the profiler when running
the rake following rake tests:

benchmark:many_modules:run
benchmark:defined_types4:run
benchmark:defined_types:run

CPU consumption with this patch in place is between 70% - 75% of
what it used to be.

Profiling was performed using stackprof
https://github.com/tmm1/stackprof
(PUP-3436) Add optimized copy-constructor for Resource.

The Resource::copy_as_resource first created a new Resource
instance with all bells and whistles which means extracting
title, munching, and tagging. This commit ensures that these
fields are more effiently initialized when the source is
known to be a Resource.
(PUP-3436) Prevent unnecessary copying of tag sets.

This commit removes an unnecessary cloning of a tag set in the method
Puppet::Parser::Resource#add_scope_tags. It also removes unnecessary
processing of the tags since they have undergone this processing
already.
Merge branch 'PUP-3436_optimize-cpu-intensive-compiler-methods'