Remove trailing whitespaces in .h, .cpp, .c and .lua files.

For the record, this is the python script I wrote:
```python
#!/usr/bin/python3

import os
import fileinput

def trim_trailing_whitespaces(path):
  for line in fileinput.input(path, inplace=True):
    print line.rstrip()

for root, dirs, files in os.walk("."):
  for f in files:
    if f.endswith('.py') or f.endswith('.lua') or f.endswith('.h') or \
       f.endswith('.cpp') or f.endswith('.cc') or f.endswith('.c'):
         trim_trailing_whitespaces(root + '/' + f)
```