added code to initialize query_hooks, so when finalize_fn is called later for all possible hooks, there wont be any surprises
made sure "finalize" really got called
and only the necesaary hooks got called
made can_evaluate's sigunature return int as everywhere else
leaks avoided
Merge branch 'adios-query' of https://github.com/ornladios/ADIOS into adios-query