add stress tests + fix a bug

1. stress tests try to overload the system by making thousands of
   image manipulations.
2. add lock to an image which indicates if it's currently being manipulated.
   because image manipulation opertaions are async, a user might mistakenly
   try to perform operations in parallel, which will results in trying to
   access the same memory for different operations, which can cause
   seg faults. we prevent this by throwing an exception if the user tries
   to do more than one operation in parallel on the same image.