Additional changes from the main branch

Manually pulled as the github client is brain damaged!
More changes with difficulty.

It still doesn't work and pulls out no nonces as the difficulty is
computed wrong. Should be 0.something it's 29.blah so of course this
causes quite some issues! Still less wrong than a few hours ago however.
Search for the difference in branch.

Would be much easier if github client wouldn't keep swapping out files.
more manual merges

I'm missing something, but what?
More manual merges

Nothing seems to be interesting there.
WTF is going on with options?
miner.h does not seem to have what I need.
Do not mulitply here by the adjusted diff

no DM_SELECT anymore, now works, no HW errors and such. Nice.