Adding support for various notifications

* Adding new SQL upgrade for notifications
* Added support for per user notification settings
* Added account_id to notifications table
* Added new notification_settings table
* Added new account page: notifications

Addresses #144
Adding new notification system for new blocks

* Modified findblocks cron
* Modified notifications cron for new structure
* Improved notification class
* Added new template for new_block type
* Moved idle_worker type template
* Added new_block type to notification settings
wrong method call
Adding notification on automatic payout

* Added new mail template
* Added notification code to auto_payout cron
Added manual payout notification

* Added mail template for manual payouts
* Added code to account page to notify via mail on payout
* Added new option to notification setting template

Adds another feature to #144
wrong syntax in upgrade SQL
Updated SQL Files

* Updated upgrade SQL
* Added full new structure
Fixing issue with notification cron

* Updated getAllActive to search by type
removed commented section to re-enable auto-payout
adding full notification SQL for regular installations
Merge pull request #151 from TheSerapher/issue-144

Issue 144 : Add notification handler and settings
Adding support for block finder bonus

* Added new configuration option `block_bonus`, see `global.inc.dist.php`, default 0
* Added new transaction types: `Bonus` and `Orphan_Bonus`
* Changes transaction table structure, added upgrade SQL
* Changed findblock cron to credit bonus to finder
* Modified transactions class to reflect changes

Fixes #148
Merge pull request #153 from TheSerapher/issue-148

Adding support for block finder bonus

Fixes #148
removing left over debug in findblock
Update edit.inc.php

Emergency fix: Transactions are not aborted if RPC transfer failed.
Fixing manual payout race condition

* Mark manual payout active
* Run payout logics
* Reset manual payout

This ensures only one manual transaction can be run at a time.
If any users starts a manual payout others have to wait until the site
completed loading and finished the transaction process.

As long as we don't have too many users doing a manual payout at the
same time this should not be an issue. Best for users is using auto
payouts anyway.

This addresses #149
Merge pull request #154 from TheSerapher/issue-149

Fixing manual payout race condition, fixes #149
Make email mandatory during registration

Partially addresses #142
Allow users to change their email address

* Added email to account page
* No confirmation required as of yet

Fixes #142
Merge pull request #156 from TheSerapher/issue-142

Issue 142