Finishing assignment 4.1

Statistical estimation: implemented a class called Statistics that will
be used by the query optimizer to help it decide among the various query
plans.
Finishing assignment 4.2

Generating query plan: pushing selections and computing optimal join
order (left-deep only). Designed a class hierarchy to represent the
query plan.
Working on assignment A5

I have implemented the DML queries (SELECT ...) and passed all tests.
The next step is integrating DDLs (CREATE, INSERT, etc).
Fixing a pipeId bug.

After each execution, the pipeId must be reset to zero. Otherwise
later rounds will throw segfault.
Fixing a destructor bug

Some query nodes copy schemas from its children and some just refer to
them. When the destructor executes, those shallow copies will be deleted
twice. This leads to very hard-to-find bugs, where the first queries can
execute nicely but subsequent ones failed.
Set outputs

Output methods now support
 * Output to screen (stdout)
 * Output to file
 * No output (show query plan only)
Fixing several bugs listed below:

 * Join buffer allocation: used malloc to alloc not aligned space.
 * Statistics: forgot to clear state before each read.
 * Memory issues: Alloc arrays using new char(5), this compiles but
   fails during run-time.
 * Delete arrays using delete[].
 * BigQ: unknown issue, switched to Qi's code.
 * File.cc: uninitialized curLength. This did not affect execution,
   but generate ugly outputs.

All these bugs are very hard to find and took several hours to hunt.
Some lessons I've learnt from this ordeal:

 * When using an object across iterations, check their status before
   each round.
 * Be very careful with allocs and deletes. Seg faults, corrupt memory,
   double free, etc are all caused by these mistakes.
Finishing assignment 5

Added CREATE, INSERT, SET OUTPUT statements, fixed several bugs
and ran all queries.
Merge branch 'a5'

Merged assignment 5 (final project) into the main branch.

Conflicts:
	src/Statistics.cc
	src/Statistics.h
Adding scripts to setup SQLite for testing

This guide `README.md` is written by my classmate Neeraj. It provides
step-by-step instructions to setup SQLite for TPCH dataset. Use it to
test results of the demo queries.