Re: My moto X 2013 has started lagging alot these last few days.
I agree with bc2k, the lag you're experiencing is probably being caused by a bad application. I recently had to uninstall Facebook Messenger because even when I was not using the app, and force closed the app, it would run in the background and cause my phone to lag, and would drain the battery. I read the reviews on the play store, and it looks like a lot of users, especially Moto X users (you can choose to only see app reviews from users with the same phone as you) have been having trouble with lag and battery drain. I just use Facebook in the browser and don't have any of their apps installed.
You can go to Settings>Apps the swipe to the left to see currently running apps. You can also go to Settings>Battery to see if any apps have been causing excessive battery drain, if they are using a lot of power chances are they could be slowing down your phone.
As the for the camera starting automatically, I'd try what bc2k mentioned and turn off the twist to open functionality. See if that helps, it may be a problem with your motion sensors or with the software.
I seriously doubt you have a virus. More likely a bug or a badly coded application.