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
work2d: Accept nonce difficulty with submissions
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
configure: Build work2d code for avalon2
avalon2: Rename avalon2 driver to avoid digits in name (AV2 -> AVD)
avalon2: Always use pdiff 1 for shares