Eleven-dimensional supergravity as a constrained topological field theory