Add 2D vector functions to parser

This commit registers functions with the HardFactorParser which can take
dot products, norms, and squared norms of 2D vectors. This allows the
hard factor expressions to be more readable than they would be otherwise.