libcheri: Added API for getting the length of a sandbox