M500 and M501 support, partially implemented

M501 works flawlessly
M500 works to set min and max but occassionaly fails on bad values
subsequent G commands out of the min max range hang the device

This is a work in progress!