Fix issue #2: Optimize level preprocessing

Level preprocessing is now down in one fell swoop, it is done in a
single pass over all of the layers. I have defined some local
(private) functions to assist in the preprocessing. The main function
added would be Level:preprocess(). It should be called after mixing
in the exported Map files data into the Level instance.