Boundary deformation theory and moduli spaces of D-branes