* Fix hashrate calculations and include archived shares
* Fix worker activity to only check for our_result = Y shares
* Mark as active if worker has a hashrate > 0, removes a query
Addresses #561, crons need to be updated to remove the active flag from
as the worker activity and check the hashrate instead.
If no workers are found false is returned. Smarty is not able to set a
default on `false` values so we have to set it to 0 if the query failed.
Fixes#418
Go through all active notifications (active means they are not notified
again) and check if their state has changed. If so, mark as inactive and
allow for re-notification of the same type and data.
* Added main mail class
* notification class extends mail class
* Added mail template for IDLE workers
* Added notification table to SQL structure
This works already but once notified the status is not reset as soon as
a worker is active again. Need to think of a system to do that
automatically.
Addresses #116