Added methods peek_head() and peek_tail() and corresponding tests.