Clean up code for examples

Many people (myself included) resort to code examples as the primary resource for trying to understand a new library. The examples for Pixi are great; they demonstrate different functionality in a minimalistic fashion. However, the code for the examples are messy and unstructured.

This is my attempt at improving the readability of the code for the examples. The changes are mostly of a cosmetic nature, but also some clean-up of resource loading and general JavaScript linting issues.