Build fixes

This includes work by engstad for cargo compatibility and rustc updates and then some updates by me for rustc updates on top of that. There isn't any new functionality.
It is true that it's not required for the example.rs that's included at the moment, but that function can be entered multiple times on the same call stack without too much contortion. A scenario that would do it (I believe) is:
 - A click on window A opens up a modal dialog, window B (say, a MessageBox).
- Window B runs the message pump while it is open. Window A's WindowProc and click handler is still on the call stack.
- Window A gets a WM_PAINT. Now its window A's WindowProc is on the call stack twice.