Improve DeliveryReceipt code, add javadoc

Also make Packet.getExtension() use Generics