Solved SwapNodesInPairs, Refactored old code

Made TreeNode and ListNode as separate classes, not inner classes
anymore.