api: remove limit checks from buffer_get_slice

It is not possible that the indexes are out of range so rather than fixing the
previously present range check we can just remove it and instead add a comment
explaining why we don't need to check the ranges.