Added a hash function for PortRange.

Review: https://reviews.apache.org/r/22333