app: needs_sync is now an attribute, added stat_local method

- Removed duplicate attribute long_status
- Added lots of debugging logging