Analyse the given AST
analyseAST ast results in global declaration dictionaries.
If you want to perform specific actions on declarations or definitions, you may provide
callbacks in the MonadTrav m.
Returns the set of global declarations and definitions which where successfully translated.
It is the users responsibility to check whether any hard errors occurred (runTrav does this for you).