use current cell's type when inserting

this preserve all previous behavior, 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
inserting new cells preserves type  closes #4917
add tests for cell_type preserving insertion
Merge pull request #5882 from ivanov/preserve-cell-type

inserting new cells preserves cell type