Partial Algebras and their Theories