Add clear function to opcode_list_t.

Clear function was added to opcode_list_t, along with corresponding
test functions.