hashlog: use work objects, put struct in miner.h
api: add meminfo query to debug mem storages
scan range: add boundary check, cant be > UINT32_MAX
api: fix histo gpu/thr id mismatch