Make project close and plugin shutdown save (scala) project-specific preference stores as well.

Fixes #1002304, #1002243