3.0 fix btm marshaller

This fixes the bug https://github.com/cakephp/cakephp/pull/4237 was trying to fix, but adds support for composite keys and tests
No, actually, exactly one. What the collection is doing is piling all queries into a bunch of UNION calls. At the end only one query is executed.