Added metadata.json files support and removed metadata.php files support

Title mostly says it all. I've also added sorting plugins and themes by name rather than directory name.

I also decided to create a metadata class to decrease the size of `qa-base.php` and because the methods in that class are independent enough to split them. Anyway, I won't get mad if you still want to add them to `qa-base.php`.