slave: Encode response messages.

Now the response messages get encoded with percent-encoding too, with the
exception of the error/informative messages, which are in this format:
```[CODE] message```
This way there can be no mistaking whether the received message is an
actual API response or not, since the [ and ] characters are reserved.