Bug 786533 - Remove mailnews/ variation of NS_MIN/NS_MAX for mixed 32/64-bit types.  r=ehsan
Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed.  r=ehsan
Bug 786533 - Sprinkle a few -DNOMINMAX and fix uses of std::min with mixed 32/64-bit types.  r=ehsan