add support for autoreply to unstructured messages medic-webapp#627

also added bit more test coverage.