(#11133) If a node definition uses a regex, make its capture variables a...

If a node definition uses a regex, make its capture variables available in the node's scope

We've been using this patch in our production setup for quite a while now (to the point where I'd forgotten that it hadn't been pushed back upstream - oops!)

Note: this is named as fixing http://projects.puppetlabs.com/issues/11133 which was flagged as a duplicate of http://projects.puppetlabs.com/issues/2628