Triggers moved to the Routines domain

Triggers are events which execute an internal (Procedure) or External
(Callbak) routines: hence conceptually they belong to the Routine API,
since we made this one to includes all the components for the execution
of routines.
Also, in the future we will support bodies for triggers, making them
partial routines (in the way .NET events allow the definition of
anonymous methods)
Query planning refactoring

Simplifications of the query plan builder; refactoring of the classes
for readability