Foundations of the Complex Variable Boundary Element Method