refactored data loading and tokenisation utility functions so that they can be used directly from unit tests

previously unit test had their own data loading pipeline which may have been different from the main pipeline
fixed wrong field reference in unit tests, added meaningful __str__ to XMLTokenizer
updated unit tests so that they reflect the new policy that keep_only_IT should only have an effect at decode time