Convex-profile inversion of asteroid lightcurves: Theory and applications