Fixes duplicate inline script and styles when caching is enabled (https://github.com/joomla/joomla-platform/issues/673)

https://github.com/joomla/joomla-platform/issues/673
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26551

I fixed module cache logic in order to consider the logic of the "script" and "style" objects of the document's head data array

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
 https://github.com/joomla/joomla-platform/issues/673