checkSource returns false if image/video has not loaded

checkSource unit test still runs but skips drawImage if image fails to load,
usually due to network disconnection.
Improved debug logging
- Use .warn and .error where appropriate
- Allow overriding of logging methods
- Add some unit tests for logging