switch from raw to scoped pointers

this effectively eliminates some memory leaks which could occur when a command fails to execute
update boost to 1.57.0
bugfix: commands aren't sent anymore after an error
code improvements
bugfix: UID's have to be escaped