Added promise timeout and LIFO command queue.

The promises now time out using setTimeout() after a certain period
that's defined as a constant in generator.js.  When a command is sent to
generator.py, the promise is notified (handy for users).

Commands are not sent when receiving a request. Instead, when data is
received, the last promise that entered the queue is sent. This does
mean that it hangs when generator.py sends no data or no valid json (or
no error), but that shouldn't be a problem.

Fixed spec, the remove whitespace method was only defined on string
objects and would hang on an undefined value.

Removed generatorPySpec.js, it was old and obsolete.