Fixed: Infinite loop when a first responder has a nil superview

This bug appears only if a table view have been added to the window.

CPTableView observes first responder changes and moves up in the view
hierarchy to determine the edited data view. If for some reason, a
superview in the hierarchy was nil, we entered an infinite loop.

This commit adds guards to the recursive method that searches the data
view. Also added an early return when the fr changes to a view outside
the table.

Fixes #1875
Merge remote-tracking branch 'upstream/master' into CPTableView-viewForRow-infinite-loop
The FR can be a window, don't check if it's inside a table.
Merge pull request #1876 from cacaodev/CPTableView-viewForRow-infinite-loop

Fixed: a view outside a CPTableView causing an infinite loop when becomes FR.