[indexPattern] don't use scripted fields when the source doesn't contain...

fixes #2239, fixes #2239

These changes prevent script errors because of undefined mappings, prevent script values from being used as source values if the source didn't have a value to begin with, and prevents date scripts from returning 0 when the field is not defined in source.