Optimal Distribution-Free Sample-Based Testing of Subsequence-Freeness