LUCENE-4236: move all crazies into one place

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4236@1596442 13f79535-47bb-0310-9956-ffa450edef68