Adds elgg_get_file_simple_type() to core

Adds refactoring to #7319 to add docs, clean up docblocks and style stuff.
@hypeJunction disregard, I see.