The company behind the Roomba automatic vacuum cleaner is filing for bankruptcy and will be taken private for restructuring.