Changed  the number of occurrences functionality

Modified the number of occurrences functionality, so that setting the
number of occurrences will calculate a new ending date. This supersedes
problems with the previous way that number of occurrences worked.

Added a multi function unit test, that tests and demonstrates all the
added functionality.

Fixed a (bug) wherein previous and next occurrence functions were not
returning anything on excluded dates. Now, the previous and next
occurrence functions will continue searching within the applicable range
until they find an actual occurrence.