REACH-70 Turn GetDefinitionLineIndexMap method into static helper method in CodeBlockUtils.

Also new test cases were written to test this new helper method in various combinations.