Fix make dist, put doc/ into tarball.
Fix make dist, omit object files in optional/ (#519).