Implements __int__ and __long__ for Quantity

Close #170