Initial implementation of lags code

Implemented series of regular expressions to handle lags.

New tests to accompany new code.

Clean-up, along with leads treatment, to follow.
Initial work on leads handling

New regular expression to deal with indexes with no sign (still
testing).

New test function for leads.
Further work on lead handling (with no sign)

Modified tail of `index_pattern` with negative lookahead assertion on
opening square bracket. Obviates need for tailing version of
`index_pattern`.

Test case still not passed.
Add string replacement to deal with no-sign leads

Lead with no sign requires a string replace() operation to deal with
problems in previous regular expression.

This 'solution' requires review during clean-up.