Fix for AMQ-5306. Cleaned up logic around the creation of multiple and composite destinations. Added tests.