Returns true if this list begins with the elements of prefix in order.
An empty prefix always matches. Runs in O(prefix.size).