Re-enable TransformDistinctToReduced making it much stricter about the kinds of queries it will optimize.
Expands the unit tests to cover various scenarios identified in the associated bug (JENA-587)

git-svn-id: https://svn.apache.org/repos/asf/jena/trunk@1541139 13f79535-47bb-0310-9956-ffa450edef68