Merge pull request #28 from zhengzhiren/master

fix conflict
not receive offline message when the first time register
add heartbeat interval into init_reply message
fix bug: save regapp into storage after register
add KeyExpire