Refactor to unify spf.net.script and spf.net.style.

Moves common code from spf.net.script and spf.net.style into spf.net.resource.
Reduces duplication and enforces consistency between the script and style
execution/loading models.

Progress on #25.
Merge pull request #46 from nicksay/refactor-script-and-style

Refactor to unify spf.net.script and spf.net.style.