Allow to do delete on a reference counted object if the reference counter is 1.
Add RefCountedList and RefCountHandler type.

ReferenceCounterList is RefCountedList<ReferenceCounter*>: A simple list of reference counted objects.
Object added/removed to the list will see their reference counter adjusted accordingly
RefCountHandler is a convenience utility class which help manage reference counted objects
Increase ABI version
Make MetaDatalookup and MetaDatalookupList a reference counted object / list

Ref: #11754
Minor style consistency fixup
Have the ThumbnailDLEvent own the ThumbnailData.

Fixes a few leaks that would occurs if any errors were encountered

Ref #11754
Fixes most memory leaks in libmythmetadata

Allocated memory was rarely freed, when freed many were missed.
Completely revisit memory management:
 - Owner of an object is the list that contains it
 - Use reference counted lists

Some coding style fixup (mostly inconsistencies)

Ref #11754
Code-style fixup. Remove unnecessary class members
Make signal haveResult(metadata) thread-safe.

Fixes potential leaks should there was no listener set. If there was more than one listener at a time it would have crashed
This change the definition syntax for RefCountHandler. For some reasons Qt wants a default constructor to be defined so an object can be defined as a qMetaType.
It's actually much better that way, allows for multiple-listeners and prevent to send pointers across thread/classes which is a bad idea to start with

Ref #11754