Denormalization resolver

Changes include : 

* Getting all the query strings from ASTs and not from earlier constructed strings. This is required because query ASTs need to rewritten depending on the final fact picked, if it requires to access reference field. GroupbyResolver is changed to work with ASTs directly.
* Fixes few issues in JoinResolver in pruning join paths depending on candidates picked
* CandidateTableResolver figures out if a field is not available and is available through a reference.
* CandidateTableResolver is extended to prune more tables with denorm reference availability.
* Tables that not directly queried but required in DenormalizationResolver and Auto join resolution are added as optional tables and final tables are picked according to final queried candidates selected

looks like if is empty can we remove it, by negating the if condition and just keeping else part.