Bolsonaro has turned to military-linked advisers as his relationship with legislators and the courts has cooled.