Joe Manganiello spent six days detoxing from Dilaudid pills before meeting Ben Affleck for the Batman role