Factors associated with and causes of perinatal mortality in northeastern Tanzania