[CID-1182105] - Prevent NPE on a PermalinkList::findNearest() returns null in ConsoleCommand.java

The change also adds annotations to PermalinkList.

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
[CID-1182112] - Prevent NPEs in plugin info retrieval

The change adds the handling of null Jenkins instance in PluginWrapper.
ListPluginsCommand also checks for the missing pluginInfo

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Fix potential NPEs in hudson.util.XStream2

The commit adds missing annotations and null checks.
Fixes CID-992747, CID-992746 and CID-992703

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>