Added method

Added a method to check whether a loop bound check optimisations can be performed.
Modified method signature for method

Modified signature for the method which handles bounds check phase 2.
Added methods to check validity of an index
Incomplete implementation

The valid index check is currently incomplete
It does not check for child loops nor does it check for loop invariants.