* Remove static cfg values from GUI cache.
Theres no need for these values to be copied into the cache when templates could simply access the config struct directly.
This also changes the cache accessor so it returns a copy of the cache rather than a pointer, which removes a potential race.
* Rename and move cache.
Cache code was previous in `homepage.go`, but its used in multiple places and not just on the homepage. Its enough code to go into its own dedicated `cache.go`.
* Add network proportion to homepage and /vspinfo.
Proportion is calculated using the number of tickets currently registered with the VSP, divided by the total size of the network ticket pool as reported by `getblockheader`.
The value will only ever be an estimate because:
- it's possible for a single ticket to be added to multiple VSPs.
- vspd does not distinguish between immature and live tickets, whereas `getblockheader` only reports live tickets.
- `getblockheader` is reporting the size of the ticket pool as of the previous block, not the current block.
* xaur suggestions
* Show missed ticket %, not just the raw number.
* Ensure purchase height set for confirmed tickets.
* Show purchase height in admin screen.
Only show purchase height when the ticket is confirmed, because if a ticket is not confirmed, its purchase height is not yet known.
Plus a few other miscellaneous pieces which will be usedful soon:
- Remove `Get` from func names `GetCookieSecret` and `GetFeeXPub`.
- Add helpers to encode/decode integers/bytes.
- Use bootstrap to improve layout.
- Add warning banners for webserver debug mode and vspd closed.
Admin page:
- Replace listing of all tickets with form to search by ticket hash
* Add support email to gui.
* Use Decred fonts
* Use Decred favicon
* Add pubkey to homepage. Use properly typed struct for template data.
* go mod tidy