Theory and simulation of gelation, arrest and yielding in attracting colloids