Added support for testnet, enable when running configure.
stylistic changes:
- unindent macros so they are on the same column always.
- clip long lines to 80 char max horizontal limit.
- comments always on their own line.
- refactored work_required() to look nicer.
- { and } always on a separate line.
Merge branch 'spesmilo' into testnet