From a slacker detective to a stern captain, Brooklyn Nine-Nine proves that comedy and seriousness can coexist perfectly.