Fix thread/run loop issues.

Standardize iOS Conditional compilation.

Implement support for devices expiring.
Update README with link to java library and a little more detail.