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

When candidate table does not have the field, this method checks if the field can be reached through reference, if yes adds the ref usage and returns to true, if not returns false.