Preparation of nanocomposites of linear poly(ethylenimine) with layered hosts