Consistent error handling in Liquid tags

As discussed in #1496, this PR makes the error handling across the different custom Liquid tags in jekyll more consistent.