Separate method for adding features to an invalidation set.

Tried to improve readability. Also re-arranged the for-loop a bit.

This CL is part of splitting up [1].

[1] https://codereview.chromium.org/639433002

R=chrishtr@chromium.org

Review URL: https://codereview.chromium.org/652703002

git-svn-id: svn://svn.chromium.org/blink/trunk@183633 bbb929c8-8fbe-4397-9dbb-9b2b20218538