Move HCP-cache clean-up to autoupdate code

Clean up on every soft restart (every time the js app loads) not on every hard
restart (every time the native shell loads). This fixes the problem described
in issue #2727: HCP cache keeps accumulating in development mode leading to
crashes.