Add a zip array handle

The zip array handle takes two array handles and provides the interface
to a single array handle with pair entries.  Of course, also had to add
our own pair class since you cannot use the std version with CUDA
devices.

The main motivation for this is to implement a key/value sort.
Add a unit test for dax::Pair.
Merge branch 'tuple_less_than_operator' into sort-by-key-test
Update the dax::Pair test to check comparison operators.
Merge branch 'tuple_less_than_operator' into sort-by-key-test
Merge branch 'sort-by-key-test' into sort-by-key
DeviceAdapterAlogirthmSerial nows uses DeviceAdapaterGeneral

Instead of implementing every single device adapter call, we
use the general class that reduces the implementation to only a couple
of algorithms. This might make the serial execution slower, but since
that is only used for debugging, nobody should care.

The upside to this is that we dramatically reduce the amount of code,
and the maintenance time for adding new methods to the device adapter.
Fix warning about using namespace std before std defined
Add SortByKey to all device adapters.

This allows use to sort an array of values, using a secondary
key array.
Make the Superclass typedef for derived array handles public.

We need this public so we can slice these classes so they are usable
with device adapters.
ArrayPortalZip needs a copy constructor to support InPlace transfer.

The InPlace transfer requires the ability to set a ConstPortal with
the contents of a normal Portal, now this is possible.
Allow IteratorFromArrayPortalValue to be copied and assigned.

The TBB sort algorithm requires that the values be used can be
assigned, and copied.
Implement custom std::swap for dax IteratorFromArrayPortal

IteratorFromArrayPortal return objects instead of references to
objects, this combined with the fact that tbb calls std::swap instead
of properly using name lookup, requires us to design a custom
swap function in the std namespace.
Throw an error if trying to Copy out of an ArrayHandleZip.
Add a test for SortByKeys
Merge branch 'clang-warnings'
Work around bug in nvcc

Before, I was getting this strange internal error from nvcc:

  nvcc error   : 'ptxas' died due to signal 10 (Bus error)

This simple change works around whatever problem that the previous code
was tickling.
Merge branch 'nvcc-error'
Provide a patched version of tbb::parallel_sort to use ADL swap.

The previous std::swap workaround created undefined behavior as
it added new functions to the std namespace. With the patched
version of parallel_sort we are able to use argument-dependent lookup
to call the swap member function of IteratorFromArrayPortalValue.

Below is the email I received from Intel stating that they
received my patch to TBB.

This note is to acknowledge receipt of your contribution to Intel Threading Building Blocks.  Our development team will look at your suggested changes to use std::swap in parallel_sort, and consider them for inclusion in some future release of Intel TBB.  We appreciate every contribution our users make to improve the library and give each suggestion due consideration.  Thanks for taking the time to suggest these changes.  Hopefully they will show up soon in the distribution.

-----Original Message-----
Sent: Thursday, June 27, 2013 12:17 PM
To: TBB_contrib
Subject: Form submission from: Submit Contribution Form

Submitted on Thu, 2013-06-27 12:17
Submitted by user: 16118235
Submitted values are:

--Step 1--
Email: robert.maynard@kitware.com
Please provide a brief description of your contribution:
Created by diffing with tbb41_20130516oss

parallel_sort directly calls std::swap instead of using argument-dependent lookup.  Calls to std::swap should be done in an unqualified manner to allow custom overloads for non-fundamental types to be called. In my case this is needed to support Iterators that return rvalue proxy objects.

Upload file for contribution (please zip multiple files):
http://threadingbuildingblocks.org/sites/default/files/webform/contributions/tbb_parallel_sort.diff
...
Merge branch 'sort-by-key'