Restructured TS map computation

As close to final as it could get today.
@adonath Here's the info how you can reset the git submodule pointer:
`https://github.com/astropy/astropy/pull/3091/files#diff-c72977d514af3c4ae1f5dd7abcdfe892R170`