@newclear, I had a good look at the AccelStepper library. It was clearly written for a platform that is dedicated to the stepper task. This is because all timing is done in software with no hardware interrupts (using a timer for example). This is why it will NOT work properly when anything injects a timing skew (ie WiFi and Cloud servicing). This is a known limitation of the AccelStepper code. Using timer interrupts has been tried by others (eg. on Teensy 3) with varying success. If you can find a suitable timer interrupt-driven stepper arduino library, I may be able to port it for you.
I suggest that if you want to use the AccelStepper library, you accept the fact that you cannot be connected to the Particle Cloud at the same time. You may be able to have wifi connected since it requires much less overhead. So stepping and connecting need to be mutually exclusive.
Another approach is to use a stepper controller breakout like these:
These boards do all the timing work, allowing the Core/Photon to do what you are looking for.