[smartonic] simplify user_input_variable

Also, mark some INFO messages as DEBUG
[agent] strip ansi codes before sending them on the wire

ANSI codes in XML are rejected by the XMPP server with xml-not-well-formed
resulting of the deconnection of the agent.