(PE-2675) Change the order that filters are applied for events

When using the `distinct-resources` flag of an event query, the
previous behavior was that we would do the filtering of the events
*before* we would eliminate duplicate resources.  This was not
the expected behavior in many cases in the UI; for example,
when filtering events based on event status, the desired behavior
was to find all of the most recent events for each resource *first*,
and then apply the filter to that set of resources.  If we did the
status filtering first, then we might end up in a state where we
found the most recent 'failed' event and showed it in the UI even
if there were 'success' events on that resource afterwards.

This commit changes the order that the filtering happens in.  We
now do the `distinct` portion of the query before we do the filtering.

However, in order to achieve reasonable performance, we need to
at least include timestamp filtering in the `distinct` query; otherwise
that portion of the query has to work against the entire table,
and becomes prohibitively expensive.

Since the existing timestamp filtering can be nested arbitrarily
inside of the query (inside of boolean logic, etc.), it was not
going to be possible to re-use that to handle the timestamp filtering
for the `distinct` part of the query; thus, we had to introduce
two new query parameters to go along with `distinct-resources`:
`distinct-start-time` and `distinct-end-time`.  These are now
required when using `distinct-resources`.

This functionality is fairly specific to PE and should probably
be separated into a PE-specific query endpoint in the future.
Add documentation for `distinct-resources` query parameter
Refactor `validate-distinct-options` into common events http ns
Merge pull request #823 from cprice404/bug/1.5.x/PE-2675-change-filter-order-for-distinct-resource-events

Bug/1.5.x/pe 2675 change filter order for distinct resource events
Document repl 'host' setting

The [repl] block also supports setting 'host' to change where the repl service
is listening to. This documents this setting, while also warning that changing
it from 127.0.0.1 is not recommended for a production environment.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #824 from kbarber/maint/1.5.x/repl-host-documentation

DOCS: Document repl 'host' setting
PDB-407 Fedora 20 Acceptance Testing

This adds a fedora 20 image to the acceptance testing image list, and modifies
any tests that need modification for these tests to pass.

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-407 Fix bug in init script for fedora

While working on acceptance tests we've found a bug with the init script for
Fedora and 1.5.x specifically. That is, the ps that was being returned during
find_my_pid did not return the fully qualified file path to be matched
against. This patch simply takes the basename from JAVA_BIN and uses that
in the match instead.

Signed-off-by: Ken Barber <ken@bob.sh>
PDB-407 Change gemfile reference for beaker to point to upstream

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #834 from kbarber/ticket/1.5.x/PDB-407-fedora-20-acceptance-testing

PDB-407 Fedora 20 Acceptance Testing
PDB-407 Make sure we add suffix for fedora packages

Signed-off-by: Ken Barber <ken@bob.sh>
Merge branch 'maint/1.5.x/determine-fedora-package-names-properly' into 1.5.x

* maint/1.5.x/determine-fedora-package-names-properly:
  PDB-407 Make sure we add suffix for fedora packages