[WIP] ADI export script (bug 1014752)

Fixes [bug 1014752](https://bugzilla.mozilla.org/show_bug.cgi?id=1014752)

Work in progress! It's not fast enough, not finished, not properly
documented...