added function to get coapoption from pdu

Anothe usefull function.