Only ask for diagnostics at first install and if heap is not sufficient.

Added PreferenceStore wrapper allowing to get options.