Refactor get_dashboard_and_render to expose buildstagecraftapiclient

This allows testing without messing with the initialize method. This
stops an asynchronous fatal error which was causing tests to error even
if all tests pass.