Add postgres functions.

These match 1:1 with their Python equivalents, and will be used along
with some custom lookup functions on our fields in order to allow
queryset filtering on encrypted data, so long as that data is unlocked.

I think that’s pretty neat.