NOJIRA Fix for problem described in pr/84

Note that you’ll have to recreate your Solr indexes because this commit
changes the way type_id fields are indexed.
NOJIRA Fix problem described in pr/87

For some reason advanced search queries are nested boolean queries
inside a boolean query. By removing the excess level we now use the
same code that does the rewriting from ca_objects.lement_code: terms to
ca_objects.AXXX (where XXX is the element_id) for basic and quick
searches.
Merge branch 'hotfix-solr'
Merge branch 'master' into release-1.4