Move shared fragmentDetached code into base PageFragment class