Tweaked NUTS algorithm with correct behavior at each subtree

Looks like this wasn't the cause of the efficiency issue with 2.0 and the bugs are subtle, but they are indeed bugs and should be fixed.  @bob-carpenter and @syclik, can you run on various models and confirm that the performance difference is negligible before merging?