Adding a stable way of adding whitelisted "orphaned" uploads in a plugin

@angus
We recently merged this PR which adds a upload_references table to address the concerns raised in the OP.
https://github.com/discourse/discourse/pull/16146