Matrix product operator algebras I: representations of weak Hopf algebras and projected entangled pair states