Certificate#show performance improvements

This reduces the amount of queries to display the certificate page (from 2639 -> 38 on a development certificate).