switch to use redis as database

redis is really stunning, very fast, quite easy to learn, and support locks well. also db was renamed to common because, well, it stores mostly common stuff. note that some functions were not tested throughly and may contain bugs