Extend split/splitOnLine to cope with 'where/with'

Main interface is via 'splitOnLine'. Give a source line, and a variable
name, provides information of what each variable should be updated to in
resulting pattern clauses, in the following form:

  [[(name_a1, pattern_a1), (name_b1, pattern_b1), ...],
   [(name_a2, pattern_a2), (name_b2, pattern_b2), ...],
   ...
   [(name_an, pattern_an), (name_bn, pattern_bn), ...]]

where the name expands into 'n' possible patterns, and the names
'name_a', 'name_b' etc need to be expanded to 'pattern_a', 'pattern_b'
etc in the resulting patterns (due e.g. to dependency).

An interactive editor should probably just use this information to do
a textual replacement on the original pattern, expanding into 'n' new
patterns.