Fix crash in selector.wakeup() with closed selector

Selector.wakeup() can throw an undeclared IOException
(from native code).

This is not compatible with the signature of wakeup(). In prior
Android releases no exception is thrown in this case.

This change reverts the behavior to the same as prior Android
releases.

Many thanks to diddysbestbud@ for the report.

Bug: https://code.google.com/p/android/issues/detail?id=80785
Bug: 18548071
(cherry picked from commit 1791f6be1bd2733babb0c862ad8509f4c847b48f)

Change-Id: I19ee879dcd783655d8a402e12855a5fa1f1eb90c
Use EMPTY_ITERATOR for EmptyList

Change-Id: Ic286c8fa6b01ba21211c0bedac66fb1b15221b1a
Remove dependency on AndroidConfig.h.

Change-Id: Ia21083b0392cc5acf5b1bbd7637a0cd0dd1fb01b