Rule: declaration-position (fixes #587)

Adds a new rule, `declaration-position`, that enforces placing function declarations and, optionally, variable declarations at the root level of the program body or a function body. By default, misplaced function declarations result in an error, and variable declarations are not checked.