implement read_segment_header() to reduce read amount in find_max_id()

- many modification of comments folded, too

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
rename prepare.sh

- add install command to Makefile folded

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>