Support named captures in UnusedLocalVariables and ShadowingOuterLocalVariable

This fixes #332.