Shore pdf grid speed improvement

To modifications on the shore fit object:

1) Improved the speed of the pdf_grid calculation
2) Fixed the bug in which the cache key for the pdf method was the sum of the array values to something that makes much more sense in the case of array parameters