Fix synchronization bug and stream position bug in HdfsFileInputStream, and Add test cases for the class

Fix synchronization bug and stream position bug in HdfsFileInputStream, and Add test cases for the class