Fixed the has_datespan calculation in reports

It would error if the filter was an explicit reference to a field and
not a string reference.
check against basestring rather than str
fix silly mistake
Merge pull request #1350 from dimagi/fix_datespan_field_check

Fixed the has_datespan calculation in reports