Store post ids during `wp post generate`.

Fixes --max_depth which was broken in fe2be3169b.
Closes #820.
Merge pull request #943 from gradyetc/master

Store post ids during `wp post generate`.