added missing license
removed copyToWriter since it was dead
split out more merger stuff
added mergeIntermediate() and test
limit RAM size during map stage and merge spil files at and of map