stash handling externalized to stash manager (in java), stash writer interface and basic impl.