Added transpose kernel to coalesce memory access in tridag. Still need to transpose some...

Various small optimizations.