Added the Pattern class.

A Pattern instance is a representation of a route pattern. All pattern related features of the Route class were extracted to create the Pattern class, and the Route class has been refactored to use the Pattern class.

Pattern related functions of the Route class are marked as deprecated, and should be removed soon.