Extend getOptions(type) from pkt6 to pkt4.
Currently the method to get all options from a packet object for a given option type/code is specific to v6: this ticket moves it to the generic packet header so it will be available for v4 too. Required for #1518 and #719 (closed).