Refactor and rename stuff.

  - Refactor loop stuff and add basic "open loop" detection.
  - Rename "brainfuck_state"-related things to something more apt.
Fiddle with loop stuff.