Optimise the VM for transfer

by Andrei Sfrenț for Apertium

The project aims to speed up the VM for transfer code (the transfer step being the slowest of the translation pipeline at the moment).