First implementation (WIP) for request: http://wordpress.org/support/topic/replace-category-link-with-link-to-first-post?replies=10
When the menu item is marked as remove "always" or "only if empty" and there was one post, then make sure that any childen of the menu item become children of this single post.
Not implemented with new parameter, instead built into existing structure, with intention of also fixing this when there are multiple posts: Duplicate all child menu items as children of each post. 

Minor:
- consistently use db_id everywhere instead of ID
- rename $removed_menu_items to $menu_item_parent_map
- unset menu_item_parent_map

git-svn-id: https://plugins.svn.wordpress.org/category-posts-in-custom-menu/trunk@959486 b8457f37-d9ea-0310-8a92-e5e31aec5664