refactor(modal): change watch expression to check local binding

$$stackedMap data structure has a length() function to check number of opened modals. 'modal-open' class on body is maintained by $watch expression. It was monitoring openedWindows.length which is always non-zero (since it's a function). $watch expression now watches openedWindows.length() and hands this value to listener callback local binding noOfModals.