Fix up compilation failures + warnings when using latest rustc

* Bleeding-edge Rustc build 0.9-2272-gd79fbba or thereabouts refused to compile rust-core. This patch set fixes up fatal compilation errors, and also replaces deprecated #[...]; attributes with the new format #![...], although some remain in ./core/thread.rs and ./core/weak.rs which can be fixed in a separate pull.

* Tested using Rustc 0.9-2280-g612e22e. Running make in ./test successfully completes without compilation and runtime failures.

* Credits: Many thanks to cmr, eddyb, strcat, kimundi and pczarn on #rust (irc.mozilla.org) for their help.