fix build errors caused by purely namespaced enums and druation api changes

1. rust-lang/rust#18973 made a change to enum namespacing, which causes a build error.
2. `num::abs` method no longer exists, use [SignedInt.abs](http://doc.rust-lang.org/nightly/std/num/trait.SignedInt.html#tymethod.abs) instead.
3. [Zero](http://doc.rust-lang.org/nightly/std/num/trait.Zero.html) trait implementation for `Duration` is removed. Instead, use `Duration.zero()` directly.