Shared base class of Vec and Direction. We do this instead of having
Direction inherit directly from Vec so that we can avoid it inheriting
an == operator, which would prevent it from being used in switch
statements. Instead, Direction uses identity equality.