AP_Buffer: allow non-scalar objects to be buffered & add peek_mutable function

This is in preparation for compass EMI learning.