Added AST documentation
Introduced AST base class.

The class overrides `__eq__` and `__ne__` in order to ensure that
comparison is only done by attribute values, not by identity.
Converted 3d AST namedtuples to real classes (refs #1)