librustc: Apply null pointer optimization to slices, closures & trait objects.

Extend the null ptr optimization to work with slices, closures, procs, & trait objects by using the internal pointers as the discriminant.

This decreases the size of `Option<&[int]>` (and similar) by one word.
My stalled-out PR #14436 has a [commit](https://github.com/kballard/rust/commit/6f01099ee0291b60ba053e9b29d4173573dcee68) that relied on changing this to always return `self.ptr`. The reason given is that otherwise `Vec::from_raw_parts(v.len(), v.cap(), v.as_mut_ptr())` will be incorrect. If at all possible, it would be nice to make that work while you're changing things.

My preference would be to make `as_ptr()` and `as_mut_ptr()` return null whenever appropriate, and instead do the null-test when constructing the slice.