Fixes #2294: Changed CyNetworkManagerImpl and CyApplicationManagerImpl to use ReadWriteLock instead of monitors to avoid deadlocking (so reading no longer requires mutual exclusion; however, writing still does).