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
6 files changed