Do some code cleanup in sx_hashfs_check()

Move stuff outside sx_hashfs_check().
Use sx_hashfs_analyze() to check internal sqlite database consistency checking. Needed to add verbose flag.
Use check_file_name() for file name checking.
Add privs and users checking
Add checking for negative block counters

Check if block with ID taken from use table is present in blocks table.
Check if used field in use table is not negative.
Split check_blocks() function to be readable.