Issue 9589 - Add hasEmpty template to std.range.

http://d.puremagic.com/issues/show_bug.cgi?id=9589

@jmdavis @andralex: Can you verify this is correctly implemented? It was briefly implemented as I needed it right away, so I figured I'd make a pull request while I'm already using it.