Override IPAddr initialization to support shorthand
Perform basic query optimizations.

This adds indexes for the most commonly used columns. We also eager load
where appropriate to lower the amount of queries.