Wren, Matthew, active 1644-1691, Secretary to the Duke of York