Detail view: support per-action filtering

Adds support for adding preFilter on a per-action basis, to assist in
plugin development. If action.preFilter function is passed, and returns
true/false, the action is shown/hidden. If no preFilter is specified,
then the action will be passed through the detail view's standard filter.

Example:

testAction: {
    label: 'Test Action',
    ...
    preFilter: function(args) {
        return false; // Action will be hidden
    },
    ...
}