Development and application of first-principles methods for complex oxide surfaces and interfaces