extract main kakoune code to a kakoune function
Add a -s command line option for specifying session name
update README