[IMPROVED] Added balance checks post payouts

Fixes #904 once merged.
[IMPROVED] Lockout user on invalid pin/password

This will lock a user account if a password or PIN has been entered
wrong for multiple times in a row. When unlocking the account via admin
panel, both counters are reset so the user can log in again.

This should fix issues with brute force attacks to access user accounts.

Please see configuration dist file for new config options.
Please import SQL upgrade 007 to add new column to user accounts table.

Addresses #670 and should be merged once tested.
Merge pull request #919 from TheSerapher/issue-904

[IMPROVED] Added balance checks post payouts
Merge pull request #920 from TheSerapher/issue-670

[IMPROVED] Lockout user on invalid pin/password
[SECURITY] Fixing potential XSS issues

Will resolve #926 once merged.
[UPDATE] Do not send mails on disabled payouts

Fixes #928 once merged.
Merge pull request #932 from TheSerapher/issue-928

[UPDATE] Do not send mails on disabled payouts
[UPDATE] Added failed_pins to base structure
[FIX] Network hashrate in dashboard

Also adds some fixes for hashrate updates on the pool statistics page in
case the API is disabled alltogether.

Fixes #934 once merged.
Merge pull request #936 from TheSerapher/issue-934

[FIX] Network hashrate in dashboard
[FIX] PHP Notice warning
Implement Templates admin page

Create `templates` table in database
Add navigation links to Template page
Let admin to manage his templates from adminpanel
Make Smarty search template in database first

If not, fallback to file template
Implement normalizer to convert gettingstarted/../support/default.tpl to support/default.tpl
Add disable_template_override variable to Smarty

To disable Database Template Overriding and use original files
Show templates tree on Admin Templates page

Show active and activated templates in Tree
Make templates tree persistent
Merge pull request #930 from TheSerapher/issue-926

[SECURITY] Fixing potential XSS issues
Update POOLS.md
[FIX] Account Lockouts on Edit Account page

Fixes #939 once merged.
Merge pull request #940 from TheSerapher/issue-939

[FIX] Account Lockouts on Edit Account page
[FIX] PHP Notice on missing $aRoundShares

Fixes #941 once merged.