nbody: Use separate runs of sort kernel to complete

Use the depth of the tree as the worst case number of iterations required.

This is the minimum effort fix required for correctness and is quite inefficent.
The sort kernel should be redesigned to be faster again.

I measure this as about 10x slower than previously.
This increases the sort kernel's contribution to the timestep's total execution time
from about ~0.1% to ~1.0%, so it ultimately isn't super critical.

This corrects the assumption that multiple workitems are always running at the same time.
This was the main issue preventing this from working on the CPU.

This assumption was made even more invalid by a transformation that LLVM 3.2 made.
It was transforming the loop

while (k >= bottom)
{
    int start = _start[k];
    if (start >= 0)
    {
        // ...
    }
}

into something like this

while (k >= bottom)
{
    do
    {
       start = _start[k];
    }
    while (start < 0);
   // ...
}

so that if a cell was dependent on another in the same wave,
they would never escape this inner loop.