Prevent patient out of fence email spam.

Only emails the carer once when the patient crosses the fence, rather than every location post outside the fence. A patient entering a fence again will reset this, meaning the carer will be notified by email if the patient crosses the fence again.
Maybe its better to check data.last_outside before querying the database for the carer, saves doing the unnecessary query.