Checks if this Transaction needs to be prepared.
Preparing a transaction costs time since the backup log potentially needs to be copied and
each logrecord needs to prepare its content (e.g. by acquiring locks). This takes time.
If a transaction is local or if there is 1 or 0 items in the transaction log, instead of
preparing, we are just going to try to commit. If the lock is still acquired, the write
succeeds, and if the lock isn't acquired, the write fails; this is the same effect as a
prepare would have.