Records show how government departments played down residents’ warnings about corrupt practices and substandard materials that fueled the deadly blaze.