Split the code into multiple files, still included from hidtest.cpp. No functional change.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>