rl_helper: add history command management

We need a growable buffer which will store a list of command strings. So
when we press up or down keys, our line buffer is replaced with old
commands that we typed.

This also fix a possible bug, when we pass a copy of line buffer to line
processing callback. So we will not have problems if we change its value
(eg strtok).
Add Write Characteristic commands

We are adding a generic write characteristic command with write_type as
parameter, so we are able to implement Write Command and Write Request
GATT operations.