Pattern-Oriented Software Forensics: A Foundation of Memory Forensics and Forensics of Things