Refactor Stoplight::Light
Refactor Stoplight::Light

Notable changes:

-   Made #allowed_errors a simple attr_reader. The instance variable is
    assigned in the constructor now.

-   Added #red? predicate methods.

-   Added helper methods on the instance that just call the class
    methods (like #green? -> .green?).

-   Renamed #failure_threshold to #threshold.

-   Convert attributes on assignment to the correct type (#to_a,
    #to_proc, #to_i, etc.).

bolshakov/stoplight,orgsync/stoplight