Refactor prefix setting duplication

I DRYed the way we set the prefixes for the specific resources. 

* `init_prefix :order` does the normal `self.prefix = '/admin/orders/:order_id/'`
* `conditional_prefix :order` does creates a `self.prefix` method which checks if `params[:order_id]` exists. Based on that it chooses either `/admin/` or `/admin/orders/:order_id/`.
* `conditional_prefix :resource, true` does the same, but retrieves the resource from the `params` provided. This requires a prefix that looks like `self.prefix = '/admin/:resource/:resource_id'`

No change of logic, only reduced the number of repeating code. Also added test for Transactions.

@csaunders @costford @pickle27