add generic Handle_T,  rewrite timer

Handle_T can specifiy how many bits used for index, and reserved bit
used for generation key.
timer now is based c++11 chrono high_resolution_clock