Energy-discounted computing and supercapacitor energy buffering for resource-constrained systems