Set delegate to nil on dealloc

Avoids a random crash on iOS7 when dismissing a view