Move n2size from struct pool to struct stratum_work
Add pool and work_restart_id to struct stratum_work so they can be used independently of struct pool
Move "nonce1" session id from struct pool to struct stratum_work
SSM: Refactor _ssm_gen_dummy_work to work with struct stratum_work instead of struct stratumsrv_job
Move/rename _ssm_gen_dummy_work to work2d_gen_dummy_work
Avoid handling hex encoding in work2d
Abstract code from stratumsrv_mining_submit into new work2d_submit_nonce function
work2d: Standardised way to pad extranonce beyond what work2d manages
configure: Make work2d building abstract from libevent
Import hash_driver_work minerloop from cgminer as of c57b15196a900f018e875bd1435036fbce372d3d
Merge hash_queued_work adaptations into hash_driver_work
Add missing export of api_add_percent
Add Avalon2 (2U size machine) support

Signed-off-by: Xiangfu <xiangfu@openmobilefree.net>

Conflicts:
	Makefile.am
	api.c
	cgminer.c
	configure.ac
	miner.h
avalon2: Fix build within BFGMiner
avalon2: Fix warnings
avalon2 & littlefury: Use shared crc16 function
avalon2: Make use of 2D work manager to avoid overlapping with other miner work
configure: Fix avalon2
Build work2d code for avalon2
avalon2: Rename avalon2 driver to avoid digits in name (AV2 -> AVD)