Derive PartialOrd/Ord/Hash for bitflags structs. Implement Default for io::FilePermission

I wanted to add an implementation of `Default` inside the bitflags macro, but `Default` isn't in the prelude, which means anyone who wants to use `bitflags!` needs to import it. This seems not nice, so I've held off on it.