add feature to limit number of notifications

add feature to limit number of notifications that can be displayed
concurrently, and queue up the rest to be displayed when there is room.
 Add example to set max notifications to 3.