Adds elgg_get_file_simple_type() to core

Adds refactoring to #7319 to add docs, clean up docblocks and style stuff.
I know these can be tempting to just do while you're here, but in the future please try to address it in another PR.