Add concatenate tests.
Add concatenate matrices API with axis.
Fix tests and refactor extent translation.