rename RDB to Rdb
fix encoder, expireat based on millisecond
add encoder tests