Fix trigger on ip_address which tries to handle blanked hostname
- If we want to modify the being-updated-row, we need to trigger BEFORE UPDATE not AFTER UPDATE
- ...and, we thus also need to "return new"
- Functions renamed to better match what they now do