Cleaned up warnings and compile errors for Rust nightly

I'm working on adding sd-daemon support, but I'm building with Rust nightly. These are some preliminary changes to make the project buildable and runnable with the current compiler.