Tab reorder

Based on https://github.com/atom/atom/pull/4117. @ardeshirj did all the work.

Closes #4117