inserting new cells preserves cell type

This PR closes #4917

use current cell's type when inserting new cells above/below

This PR retains all previous behavior when cell type is explicitly provided,
but simply adds the ability to insert cells without specifying a cell type, in
which case the cell type is inferred from the currently selected cell.