Surface-based QueryEngines keep trained state after i/o

add functionality to surface-based query engines (QE) that stores the internal state after training. When saving such as QE to disc and loading it, it does not have to be trained again before it can be used.