Refactoring definition building and analysis.

This commit acts as a "checkpoint" for my current refactoring process of the
ruby-lint codebase. I am currently too lazy to write a proper commit message
since this commit contains about 3 weeks worth of work and I failed to stick to
the principle of "Commit early, commit often".

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>