Massive tree action speedup

The tree action used to use $tree_obj->tree to get all tree entries.
This is ridiculously slow as it loads all blobs via git cat-file.
Instead, expose directory_entries from the underlying Git::PurePerl
object and use it instead.

This also required moving _mode_str (now mode_string for consistency) to
Gitalist::Utils so it could be used in the template.