codegen: generalise arguments of indexToInt, intToIndex to Rvalue
simplify the single threaded resource

This just returns anything on its local work queue. This fits into the 'runParIO' setup which initialises the thread queues with a single equally sized chunk each.
native: add an unbalancedParIO Executable method

Each thread executes an equally sized chunk, and does not attempt use splitting/stealing.
wibbles
add method do duplicate an array
native: add forward permutation

* Write combining is implemented by means of lock on each element of the output array. Threads spin attempting to acquire the lock. Once they do, they read the array value, combine the old and new values, write the result and release the lock.

* The spin lock method will not be good for highly contended locks. However, the code does loop reading without trying to write anything until the value changes. Because of MESI caching protocols, this (should) cause the cache line for the lock to become Shared; then there will be _no_ bus traffic while the CPU waits for the lock. This should be effective for all CPU architectures that have a cache per CPU.

* Since the critical section covers the entire combination function, rather than each primitive element individually, it does correctly handle tuple updates AccelerateHS/accelerate#137.
simplify slightly the spin lock operation

* This elides a 'lock' instruction and uses a 'xchg' rather than 'cmpxchg' instruction to take the lock.