Add caching of parse_template_pattern to avoid unnecessary Regexp.new
Add caching of parse_template_pattern to avoid unnecessary Regexp.new

Lifts previous caching attempt up to the top of the function to avoid additional
work.

Given an existing Addressable::Template running match 30,000 times, this change
reduces the time from 252.7 seconds to 178.4 seconds. Most of the remaining work
is in URI parse.

sporkmonger/addressable