Add iprange() to ternary ops on prefix column

I forgot to use iprange() when modifying some of our triggers. While
nothing broke feature-wise, performance takes a hit as accessing the
prefix column with a ternary operator such as "contains" will result in
sequential scan. iprange() is indexable and so using it vastly speeds up
the access.

Fixes #433.
Merge branch '433-iprange'