spec: Only install unversioned jar file

As intended by Fedora's java packaging guidelines:

https://bugzilla.redhat.com/show_bug.cgi?id=1022139
Fix javadoc warning about snapshotCreateXML(int)

Javadoc complains about:

[javadoc] x:\src\libvirt-java1\src\main\java\org\libvirt\Domain.java:1212:
warning - Tag @see: can't find snapshotCreateXML(int) in org.libvirt.Domain

There is no such method, snapshotCreateXML(String, int) was intended.
Fix javadoc comments

Correct some typos and paste the right documentation from
virInterfaceCreate, virInterfaceDestroy to the Interface.create
and Interface.destroy doc comments.
spec: Depend on java-headless for Fedora 21+

Details: https://bugzilla.redhat.com/show_bug.cgi?id=1068369
Take over libvirt-java as the primary maintainer
Fix warnings about using raw types

Eclipse generates this kind of warning:

org/libvirt/jna/virConnectCredential.java:20:
List is a raw type. References to generic type List<E> should be parameterized
Fix warnings about accessing static methods

java/org/libvirt/Error.java:217:
The static method wrap(int) from the type Error.ErrorDomain should be
accessed in a static way
Fix typos in Error.java
test: fix typo in testConnection()
test: ensure that exceptions are thrown when expected
Make comments proper javadoc comments for enum constants
Ignore editor backup files
Depend on JNA versions 3.4.1 to 4.0.0

Specify a version range for the net.java.dev.jna / jna artifact
in order to accept any version we tested the libvirt Java bindings
against.
jna: load virt-0 or virt library depending on the platform

On Windows, the libvirt DLL is called libvirt-0.dll. Trying to load
the "virt" library hence fails to find the file. Branch on the platform
and load "virt-0" if we're running on this OS, use "virt" otherwise.
Fix wrapping of native size_t data type

Libvirt function parameters having type (pointer to) size_t were
wrapped via JNA using int, long or even NativeLong. Alas, none of
these is actually correct as the size of size_t may be the same as the
size of either (unsigned) int, long or even long long on different
platforms.

JNA provides the size of a native size_t to us, so using this
information we define and use class SizeT and class SizeTByReference for
wrapping a native size_t and size_t*, respectively.

Signed-off-by: Claudio Bley <cbley@av-test.de>
tests: remove obsolete test driver

JUnit is used for quite some time now, which supercedes the tests
defined in the old "test" class.
Make Device.listCapabilities return only valid array elements

The libvirt function virNodeDeviceListCaps might return fewer elements
than requested.  Take this into account and properly decode the UTF-8
strings returned.

Additionally, the given strings are freed before returning the resulting
string array.
test: ensure the Device.listCapabilities method works
Start refactoring of error handling

Almost every class contains a processError() method with an identical
definition, just forwarding the call to ErrorHandler.processError(Libvirt).

This function is always called after a libvirt function call (as per its
javadoc comment).

But, actually, there's no use in always calling processError when there was
no error signalled by the libvirt function having been called. This is just
a waste of CPU cycles.

Furthermore, it's more than ugly that the error handling is littered all
over the place in every class.

This patch lays ground for generalizing the error handling in a common
place and removing those functions from the individual classes.

Basically, this copies the processError(int) and processError<T>(T)
methods from the Connect class to the ErrorHandler class as static
methods.

It deprecates the processError(Libvirt) method, which will be removed
eventually in a later patch.
Remove processError from Device class

Wrap any fallible libvirt function in a call to ErrorHandler.processError(..).