Refactored `one-var` rule.

The `one-var` rule now pushes to a function stack and keeps track of variable declarations for each node on the stack.