Remove string eval and replace with class_exec.

These two methods are particularly tricky in their use of string
interpolation for the `class_eval`. To remove the string passed to
`class_eval` one of two approaches is possible:

  * Retain the `class_eval` and exploit the block closure by defining
    local variables referencing the instance variables to be used in the
    eval block
  * Switch to using `class_exec` which was introduced in 1.8.7 and 1.9.
    This allows for instance variables to be passed into the block
    creating block local variables

I choose the latter for writing cleaner code and to embrace the future
dropping of support for 1.8.6.