Add div_rem helper method with docs and tests

This is a common things to do and we'll want to reduce repetition.  This is analogous to Matlab's quorem: http://www.mathworks.com/help/symbolic/quorem.html