Add matrix print function for debug

Prints a matrix's attributes to stdout for debugging
Rename sliceMatrix to matrixSlice for consistency
Copy values when setting XSETing
Improve some code readability
Make XGET return subregion of matrix

Replies with:

* Number of dimensions (dims)
* dims replies for the size of each dimension (shape)
* product(shape) replies for each value
Fix incorrect matrix slicing

Instead of trying to build an array of new values and copying it into
the subregion matrix, just share the variables so that operations on the
subregion will persist.
Increment j in for loop
reformat matrixPrint function body
Move getReshapedIndex to top of file
Change xset to write cmd in command table
Don't need to memcpy dims
Store size on matrix struct

Seems like I'm recomputing this number all over the place
Remove unused variable
Reformat matrixSlice
Make shape memcpy simpler (to me)
Box values in scalar struct for ref counting
Add zero matrix function for initializing with zeros
Slice and set values in subregion
Remove unused function
Add XZEROS and XONES for creating matrices