Added various functionalities in UntrustedObject

- If M1 is invalid or it's timestamp exceeded MAX_WAIT, log is appended with Wj = LOG_ENTRY_ABNORMAL_CLOSE and then closed
- Edited addEntry prototypes