Measuring and avoiding side effects using relative reachability