Fixes duplicate inline script and styles when caching is enabled joomla/...

...joomla-platform/#673

I fixed module cache logic in order to consider the logic of the "script" and "style" object of the document's head data

This logic is already handled by JDocumentHTML->mergeHeadData() which is a function used also to reconstruct the document headers from cache pieces so this fix is an addition of a missing - but surely wanted and planned in origin by you - piece of code

https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/document/html/html.php#L227-236
 

This is an old unresolved issue:
  http://forum.joomla.org/viewtopic.php?f=615&t=719887
  joomla/joomla-platform/#673