Improve upgrade behaviour

I've slightly changed the behaviour of machine upgrades, to ensure that speed upgrades retain the total energy per item processed. Energy upgrades now reduce the energy requirement to process each item as well as increasing the energy storage of the machine.

I also changed the function from a simple multiplication/division factor to exponential growth/decay. 9 upgrades still improves the machines by a factor of 10, but the progression is smoother now (each upgrade improves the machine by a factor of the ninth root of ten). IIRC, @PonyKuu has been complaining about this a lot lately, so I thought I'd have a go at improving it.