Started merging the code bases of Hai and Woo
Added basic structures

* Use S4 for class definitions

* Finished Database access layer

* In the database access layer, only the necessary functions are
  implemented

* db.writeTable needs special care because "distributed by" of GPDB
Use better file names