saving dialog to db

Must be rewritten for different schema
dialog editing somehow workes, but not fully tested
small cleanup

add chai dev dep
remove demo rpc
beutify pc test a little
small dialog save test
add more complicated dialog test
Add ability to select dialog to edit and create a new one