An effective theory for heavy dark matter of any spin