delete_messages crashes when a message longer than 4000 is provided
Motivation
----------
delete_messages crashes when a message longer than 4000 is provided. The problem is in `session.bulk_insert_mappings(MessageHistory, messages)`. The payload that is provided by Hermes comes from `retrieve_messages`, but in case the payload registered in the DB is `nolimit`, `retrieve_messages` replaces `payload with `payload_nolimit`, generating a Database exception :
```
DatabaseException: Database exception.
Details: (cx_Oracle.DatabaseError) ORA-01461: can bind a LONG value only for insert into a LONG column
[SQL: INSERT INTO atlas_rucio.messages_history (id, event_type, payload, updated_at, created_at) VALUES (:id, :event_type, :payload, :updated_at, :created_at)]
[parameters: xxxx'}"}]
(Background on this error at: http://sqlalche.me/e/4xp6)
```


diff --git a/lib/rucio/core/message.py b/lib/rucio/core/message.py
index 52b25007f..3e85862e3 100644
--- a/lib/rucio/core/message.py
+++ b/lib/rucio/core/message.py
@@ -143,6 +143,8 @@ def delete_messages(messages, session=None):
     message_condition = []
     for message in messages:
         message_condition.append(Message.id == message['id'])
+        if len(message['payload']) > 4000:
+            message['payload_nolimit'] = message.pop('payload')
 
     try:
         if message_condition:
['lib/rucio/core/message.py']