Fix build. Replace some instances of ~str with StrBuf

This gets ncurses-rs building again with the latest nightly. It removes some uses of ~str which is deprecated in favor of StrBuf and adds some of that annoying .as_slice() stuff that us rust users have to do nowadays.