fix(AbstractComponent): state correctly checks the states object

This fixes a bug in AbstractComponent where the states:{} collection
was only being checked when setting an entire object. Updating this
code caused the textinput component to fall out of spec, and it was
fixed as part of this commit.