fdoc: use erl_scan to find end of -spec

This handles multi-line type specs properly.