Shifted base class to `TrigFunction`

The base class has been shifted to `TrigFunction` class.
Currently I've kept the `arg` as public member to avoid calls to
getter and setter in child methods.
The hash function which is same for all the classes has been
transferred  to the `TrigFunction` class.

Fixed a couple of indentation issues