Refactors to support unit testing.

+ Refactor `AbstractLayerRenderer` to accept an `OptionsInterface` implementation to the
  constructor, and a `CaptchaInterface` implementation to the `render()` method.
+ Add missing `implements` clause.
+ Add missing `intval()` conversions.