add tests. add lintstr. refactor some lint code
detect consecutively similar blocks

Consecutively similar expression blocks are prone to cut-paste-edit
errors. It warns on it. Also used this very feature to clean up some
other parts of the codebase.
detect duplicate keys in Dict construction