Fix NPE during build.

This NPE has been caused by incorrect Integer -> int handling.
Cleanup series storage files if series is removed.

Series storage files should be removed if series object or some parent
object is removed during job configuration update.