Keep track of the current task using an enum

A number of variables is used to indicate what mxsh should do once it
receives a certain reply. It's not really necessary to store these as
individual variables since only one will be set to true at any time.
Replace them with one variable and use an enum in order to distinguish
between them.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>