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.
nit: There's an extra space indentation.