master: (1) add new ConfigRecord class; (2) prepare to three type of weeks; (3) moved some common logic out to RealmViewController