add expires to cookies() method

This PR add a new optional parameter to the cookies() method to allow the expire date to be explicit. Please note the test cannot check the expire date so the only way to test is to check its validity if its set in the past or in the future. If you have a better idea on how to test it I can improve it.