Updated baseQuery() grammar in Parser

This is a temporary fix that may break other stuff.
baseQuery was trying to parse {LEVEL} when it shouldn't be.
Currently patched by switching the two possible statements.
BasicSolver now uses QueryResolutionEngine's query evaluation instead
of constraint evaluation for constraint queries.
To do so, it passes the parent of the current node.
Revert "Updated baseQuery() grammar in Parser"

This reverts commit 3bcb08454d80cec0d2a04836f9ed542f2db6003f.
added FIXME to buggy Parser.baseQuery()
BasicSolver now contains code to form groups of properties from
constraints

The idea is to form groups of constraints that have inter-dependencies.
Once we have these groups, we can avoid full backtracking which is
very expensive, and instead re-materialize only the relevant properties.
Added sample definition for constraint groups
ConstraintSolver now saves the complex property maps
Working on restricted backtracking
Revert "BasicSolver now uses QueryResolutionEngine's query evaluation instead"

This reverts commit 68517cae6c9caae2a18166bab0e57b9fd18dc304.

Conflicts:
	src/internal/parser/resolve/constraint/BasicSolver.java
Added methods resolveRelatedProperties and
resolveConstraintDependencies to ConstraintSolver
We now have limited backtracking
    Previously, when the BasicSolver failed to satisfy any of the
    specified constraints, it would reinitialize *everything*.
    This commit introduces a working partial-backtracking solution.
    It works by resolving the definition space into sets of related
    properties and then reinitializing only the set of properties
    that the BasicSolver failed to satisfy.

Updated BasicSolver to take relatedPropertiesMap as part of constructor
Updated Parser's query grammar to be consistent
    Parser was using separate logic to handle constraint queries and
    definition queries. The reason being that, in the constraint
    grammar, the {LEVEL} was external to the query, whereas in
    definition queries, it was internal.
    This patch makes level external to both.

Updated Constraint class to reflect parser changes
    This also gets rid of the annoying double level printouts in
    Constraint's toString() and debugString() methods
Working on adding properties referenced in aggregate definitions
into the related properties map. This is required to correctly maintain
the sets of related properties.
Fixed some bugs in BasicSolver
    While checking for constraint satisfaction, the reference was
    hard-coded as constraint.query().pattern().lhs().toString().
    This has been replaced with something more appropriate.

    Null definitions were being added to the restricted backtracking
    set of definitions. This would occur when a definition was not
    present in any of the Hierarchy levels. Added null check.
Updated ConstraintSolver's static fields and method signatures
Fixed bug in ConstraintSolver.resolveConstraintDependencies()
    resolveConstraintDependencies was overwriting existing values in
    the relatedProperties map. This was causing loss of information.
Updated sample definition constraint_groups to be slightly more complex

Updated sample simple_inbuilt_relation to work with the default properties
Working on fixing QueryResolutionEngine
Merging in working branch, and started playing with some reachability queries.