Saving attachment ID as meta data of reply

Earlier reply id was saved as post_parent of attachment. But since an
attachment cannot have more than one parent, more than one reply cannot
use any specific attachment
Updating attachment database scehma on plugin update
Serving attachment file securely through PHP
Prevent inserting a same attachment twice in a reply
Add some random characters to uploaded files

This is to prevent direct access by guessing its name
Adding random characters to only files uploaded to SupportFlow

Earlier it cover all file including files not uploaded to SupportFlow
Migrate all posts with post type sf_thread to sf_ticket
Add todo note to action_add_attachment()

Note is "Conversion to a better way to determine if attachment if uploaded
through SF web UI rather than HTTP referer"
Merge pull request #160 from VarunAgw/attachment

Serve ticket attachments securely
Merge pull request #164 from VarunAgw/update

Migrate sf_thread posts to sf_ticket
Merge branch 'master' into grunt

Conflicts:
	supportflow.php