Representations of the Brauer algebra and the partition algebra in characteristic p