moves items helper functions to theme

Early in the development of this theme, some helper functions were added
to Omeka core. This moves those functions into the theme itself so users
don't have to fiddle with core Omeka files.