Add hash cost as a possible configurable option

For now it's simply calculated on install and upgrade and stored as a setting