Integral invariants in N = 4 SYM and the effective action for coincident D-branes