Add HyperLogLog type and associated functions

This is a preview of the upcoming HLL change. It sits on top of the type+indexjoins branch which hasn't been merged yet. Only the last commit matters (08b6c35).