Update the way the inline scripts are output

This is a simple update that I think makes some sense.

Now we output our ```<script> javascipt vars </script>``` then our ```<script> inline javascirpt </script>``` ... this just outputs them together inside a single script tag ```<script> js vars, inline javascipt </script>```, there was no reason for the separation and it causes an extra http call.  I did add an array_map trim just to get the indentation right(er)

I also changed things to an implode from a for-each, since all we are doing is outputting, no need to loop over something

The only thing I did not do is run the minify on the inline script, I don't think its worth it (overhead vs saving just a few bytes here)  The real savings is minimizing the number of individual script blocks.