Cleanup test codes and fix some bugs

These commits include below:
* All test codes in "src/test/test-(\w*).h" are separated into "src/test/test-\1.cc."
* Some include dependencies are removed.