Pass owner through LSM and index cursors, so that are closed in the correct order if they are part of a layered cursor.
ref #551