add flush in logreader; adjust endoffset handle to improve latency
add readwrite lock in partition.java
1. simplify consumer user API; 2. add groupid to AssignConsumer message to support retry consumerReg
fix bug:
  1. sort segments by start offset in Partition.java
  2. findSegment in Partition.java
  3. zero-length message handling in FetchReply.java
refactor consumer user API
fix consumer fail handling
Merge pull request #72 from ErikFang/realtime

sync
Merge pull request #36 from dianping/realtime

Realtime sync