Fixes #227, stage restarts on Windows should no longer cause repeated failures

Core fetches library JARs from the database when starting (or restarting) a stage. When doing this, some streams were left open for each written JAR.
On Windows, any open files block write operations, so Core could not remove the stages it had written to disk itself.

Thanks to @Nycander for pointing out the unclosed streams.