om: make algorithm include dependent on swap function

- split internal and external swap functions from a tags perspective -
  they are now enabled separately
- ensure we only include algorithm if the external swap function is
  going to be generated
- sml: make the tagging function a parameter on the mock factory. this
  ended up not being quite as useful as we thought, but we left it in
  to experiment.
- sml: improve file name generation in mock factory to make testing
  easier.