Use on_after_commit in load balancer api

Otherwise it's possible for security group related code to be executed before the groups are in the database.