Update gol_worker.js

Added short-circuiting of computation when the rules change.