cli: add retain and dont-retain commands

note that automatic message deletion currently only happens in the GUI, but I
figured that being able to set the retention flag in the cli is useful anyway.
Move (dont-)retain commands to non-subprocess switch.
Merge branch 'leif-master'