[Hackathon PR] Myrial to Clang

Port datalog tests for Clang to MyriaL, and makes them pass.
Clang now supports most of MyriaL, but not yet arbitrary `Sequence`, `DoWhile`, `ScanTemp`, `StoreTemp`

changes to note for review:
* changed parameters in MyriaTestCase and myriad/interpreter.py so that the test case class can be used for any physical algebra
* moved some rules between myrialang.py and rules.py
* added some rules to rules.py

2014-8-27
Now also contains additional features from @TheYorkWei , like writing out to files in clang/grappalang and tests.
I don't know how you use this code precisely, but when I was doing something similar for Flink I found it slightly easier to read the program and the output code by making a list of lines and then joining them. Something like this:

```python
code = ["{t} = scan({tab});".format(t=t, tab=self.tables[t]]
with ...
    code.append("out = {sql};".format(sql=f.read().strip()))
code.append("store(out, OUTPUT);")
return '\n'.join(code)
```

Obviously this is a personal preference and it depends on how readable you want the output to be.