Allows adding of post id through post vars to allow image to be associated with post
Permissions to upload by post id changed

- Now checks the post type of the post id being passed
- Rename variable to make it clearer we are trying to upload to it (post_parent)
Merge remote-tracking branch 'upstream/master' into media-upload-to-post
Merge pull request #294 from pkevan/media-upload-to-post

Allow attaching media to posts on creation