Fix compilation for latest nightly

rustc 0.12.0-pre-nightly (a1429bca5 2014-08-08 21:36:11 +0000)
whitespace cleanup
Make examples with Cargo
Fix compiler warnings
Merge pull request #25 from danburkert/master

Fix compilation and warnings against master