Fix various warnings

Change-Id: I68b53f84356885213577a0d793e69f38d5971a6a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Document and change the ListenerRegistration contract

Add text clarifying the role of this class. Also change the API contract
such that the close() method does not throw checked exceptions. Also
change the API contract such that the thread-safety is ensured via an
AtomicBoolean rather than a synchronized block.

Change-Id: Id29337ded87b812af98852decd677e3243f2179d
Signed-off-by: Robert Varga <rovarga@cisco.com>