Add a method for generating the tabkeys for sysdb.

The design of database has been changed in commit 4fa966bc0651500bec38061ce4b33e22a15407dd.
This method helps update the database by altering the db and generating
the tabkeys from m0,m1,m2,m3,m4 in the old schema.