session: when writing data in chunks create elliptics key for each chunk from the original string, since key is freed upon function return, this fixes dereference of the freed pointer