restapi: Don't use inner classes in LinkBuilder

We use anonymous classes in a rather unusual way in the LinkBuilder, we
do the follwing:

  whatever.setBody(new Body(){{setType(type);}});

Instead of this:

  Body body = new Body();
  body.setType(type);
  whatever.setBody(body);

The former is probably nicer syntax, but it has the side effect of
introducing a synthetic field in the subclass of Body that the compiler
generates automatically. This synthetic field is a reference to the
outer LinkHelper class. When Jackson tries to convert this object to
JSON it finds the synthetic field, and tries to serialize it as well.
This fails because the LinkHelper class doesn't have a suitable
constructor.

The net effect is an error when the server tries to return an error
message to the user.

The solution is to avoid completely the anonymous classes, and thus the
synthetic fields.

Change-Id: I10e0ecb68b3e0d412de486c3a38dbefa3c4dd9d2
Bug-Url: https://bugzilla.redhat.com/1093755
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 3e2af7c52118061c058aacf4abfb52162a8a282c)