Nyaruka Sync

Sync of the /nyaruka fork to rapidpro.

These all have code reviewed as individual pull requests on the Nyaruka side, see:
  https://github.com/nyaruka/rapidpro/pull/6
  https://github.com/nyaruka/rapidpro/pull/5
  https://github.com/nyaruka/rapidpro/pull/4
  https://github.com/nyaruka/rapidpro/pull/3
  https://github.com/nyaruka/rapidpro/pull/2
  https://github.com/nyaruka/rapidpro/pull/1