Springification

Lots of changes here, so I won't merge this by myself. I think I managed to avoid any direct dependencies on Spring in the code except in the test gear.

Some of the Spring XML could be tightened. Also the test gear could use some parameterization for switching ports and so forth. But I didn't want to spend too much time away from master without a merge.