core: Parse Prefer according to RFC 7240

Currently we assume that the "Prefer" header contains only the value
"persistent-auth" and we check it directly. This prevents using the
header for other purposes, like including several preferences in the
same header, as described in RFC 7240. This will be required by later
patches, in particular for the patches implementing CSRF protection in
the RESTAPI. This patch changes the engine so that it parses correctly
the hader, according to the RFC, using the Apache HttpComponents
library. A module for this library is already provided by the
application server.

Change-Id: I917aa9e56a50a0a3f85447003676ffd59752749d
Related: https://bugzilla.redhat.com/1077441
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 15e3b2cb39752a4914847365fc49c5b9289d4a52)