Fix --benchmark generating valid work for cgminer.

Conflicts:
	miner.c
Merge commit 'de1b0f1' into bfgminer
Extend stratum connections another minute (total 2 minutes) after the last work item was staged, and maintain last_work_time for non-stratum pools.

Cherry-picked from: b4cac54a7e7541206a89c7aa128793c82437e344

Conflicts:
	miner.c
Update a pool's last work time when the work is popped as well as staged.
MMQ it's a bitstream

Conflicts:
	driver-modminer.c
Merge commit 'f466022' into bfgminer
clear_stratum_shares: Rename diff_stale variable to diff_cleared

Cherrypicked from 42a01e7b37789c31933cc7a73e7ed4266bbd48ae

Conflicts:
	miner.c
Recreate cURL for new stratum connections, and clear stratum_notify on suspending them

Cherrypicked from 66c567ab2e2901537eccaeab063ce650666751e5

Conflicts:
	util.c
LTC text typo
Merge commit '4fe7feba' into bfgminer
Cleanup when stratum curl fails to initialise.
Bugfix: ztex: Initialize fw_buf pointer to NULL so a free before allocation is safe
Merge commit 'f1cfb96' into bfgminer

Conflicts:
	libztex.c
add 'count' to cumstomsummarypage 'calc'
Fix typo
API V1.25 - add 'Last Valid Work' time for each device

Conflicts:
	README.RPC
	api.c
	miner.c
miner.php report 'Last Valid Work' as time before request
Merge commit '4300905' into bfgminer
Merge branch 'rpc_last_valid_work' into bfgminer